import store from 'assets/vuex/storage'

export default [{
  path: '/',
  redirect(route, resolve, reject) {
    if (!store.state.user.id) {
      resolve('/login');
    } else {
      resolve('/index');
    }
  }
}, {
  path: '/login',
  component: require('./assets/vue/pages/login.vue')
}, {
  path: '/index',
  component: require('./assets/vue/pages/index.vue')
}, {
  path: '/home',
  component: require('./assets/vue/pages/home.vue')
}, {
  path: '/new',
  component: require('./assets/vue/pages/new.vue')
}, {
  path: '/self',
  component: require('./assets/vue/pages/self.vue')
}, {
  path: '/statistics',
  component: require('./assets/vue/pages/statistics.vue')
}, {
  path: '/browse',
  component: require('./assets/vue/pages/browse.vue')
}, {
  path: '/view',
  component: require('./assets/vue/pages/view.vue')
}, {
  path: '/village',
  component: require('./assets/vue/pages/village.vue')
}, {
  path: '/house',
  component: require('./assets/vue/pages/house.vue')
}, {
  path: '/practicable',
  component: require('./assets/vue/pages/practicable.vue')
}, {
  path: '/checklist',
  component: require('./assets/vue/pages/checklist.vue')
}, {
  path: '/selectview',
  component: require('./assets/vue/pages/selectview.vue')
}, {
  path: '/checklist',
  component: require('./assets/vue/pages/checklist.vue')
}, {
  path: '/backlog',
  component: require('./assets/vue/pages/backlog.vue')
}, {
  path: '/analysis',
  component: require('./assets/vue/pages/analysis.vue')
}]